import { GSprite } from "../../../../../../com/mui/controls/GSprite";
import { ItemData } from "../../../../resource/info/ItemData";
import { Language } from "../../../../../../extend/language/Language";
import { ToolTipUtil } from "../util/ToolTipUtil";
import { ObjCreate } from "../../ObjCreate";
import { GlobalClass } from "../../../../../../com/mui/core/GlobalClass";
import { ImagesConst } from "../../../../resource/ImagesConst";
import { BaseItem } from "../../BaseItem";
import { GlobalStyle } from "../../../../../common/global/GlobalStyle";
import { GTextFiled } from "../../../../../../com/mui/controls/GTextFiled";
//class SecondCareerRuneSubTipsBase
    
    export  class SecondCareerRuneSubTipsBase extends GSprite
    {
        constructor()
        {
            super();
            return;
        }

        public updateData(arg1: ItemData): void
        {
            if (arg1 == null) 
            {
                return;
            }
            this._item.itemData = arg1;
            this._txtName.htmlText = arg1.htmlName;
            if (!(arg1.itemInfo == null) && !(arg1.itemInfo.item == null)) 
            {
                this._txtCareer.htmlText = Language.getStringByParam(80601, ToolTipUtil.getNeedCareerName(arg1.itemInfo.item));
            }
            return;
        }

        protected /* override */ createDisposedChildrenImpl(): void
        {
            super.createDisposedChildrenImpl();
            ObjCreate.createGTextField(Language.getString(80600), 0, 0, 100, 20, this, null, true);
            var loc1=GlobalClass.getBitmap(ImagesConst.PackItemBg);
            loc1.y = 20;
            addChildAt(loc1, 0);
            this._item = new BaseItem();
            this._item.width = 32;
            this._item.height = 32;
            this._item.x = 2;
            this._item.y = 22;
            this._item.isDragAble = false;
            this._item.isDropAble = false;
            this.addChild(this._item);
            var loc2=GlobalStyle.textFormat1;
            loc2.size = 14;
            loc2.bold = true;
            this._txtName = ObjCreate.createGTextField("", 60, 20, 120, 20, this, loc2);
            this._txtCareer = ObjCreate.createGTextField("", 60, 42, 120, 20, this);
            return;
        }

        /* internal */ /* var */_item: BaseItem;

        /* internal */ /* var */_txtName: GTextFiled;

        /* internal */ /* var */_txtCareer: GTextFiled;
    }
